if(AmCharts.isModern){var saveAs=saveAs||typeof navigator!=="undefined"&&navigator.msSaveOrOpenBlob&&navigator.msSaveOrOpenBlob.bind(navigator)||function(e){"use strict";var t=e.document,n=function(){return e.URL||e.webkitURL||e},r=e.URL||e.webkitURL||e,o=t.createElementNS("http://www.w3.org/1999/xhtml","a"),i=!e.externalHost&&"download"in o,a=function(n){var r=t.createEvent("MouseEvents");r.initMouseEvent("click",true,false,e,0,0,0,0,0,false,false,false,false,0,null);n.dispatchEvent(r)},s=e.webkitRequestFileSystem,f=e.requestFileSystem||s||e.mozRequestFileSystem,c=function(t){(e.setImmediate||e.setTimeout)(function(){throw t},0)},l="application/octet-stream",u=0,d=[],v=function(){var e=d.length;while(e--){var t=d[e];if(typeof t==="string"){r.revokeObjectURL(t)}else{t.remove()}}d.length=0},w=function(e,t,n){t=[].concat(t);var r=t.length;while(r--){var o=e["on"+t[r]];if(typeof o==="function"){try{o.call(e,n||e)}catch(i){c(i)}}}},h=function(r,a){var c=this,v=r.type,h=false,p,m,E=function(){var e=n().createObjectURL(r);d.push(e);return e},y=function(){w(c,"writestart progress write writeend".split(" "))},R=function(){if(h||!p){p=E(r)}if(m){m.location.href=p}else{window.open(p,"_blank")}c.readyState=c.DONE;y()},g=function(e){return function(){if(c.readyState!==c.DONE){return e.apply(this,arguments)}}},O={create:true,exclusive:false},S;c.readyState=c.INIT;if(!a){a="download"}if(i){p=E(r);t=e.document;o=t.createElementNS("http://www.w3.org/1999/xhtml","a");o.href=p;o.download=a;var b=t.createEvent("MouseEvents");b.initMouseEvent("click",true,false,e,0,0,0,0,0,false,false,false,false,0,null);o.dispatchEvent(b);c.readyState=c.DONE;y();return}if(e.chrome&&v&&v!==l){S=r.slice||r.webkitSlice;r=S.call(r,0,r.size,l);h=true}if(s&&a!=="download"){a+=".download"}if(v===l||s){m=e}if(!f){R();return}u+=r.size;f(e.TEMPORARY,u,g(function(e){e.root.getDirectory("saved",O,g(function(e){var t=function(){e.getFile(a,O,g(function(e){e.createWriter(g(function(t){t.onwriteend=function(t){m.location.href=e.toURL();d.push(e);c.readyState=c.DONE;w(c,"writeend",t)};t.onerror=function(){var e=t.error;if(e.code!==e.ABORT_ERR){R()}};"writestart progress write abort".split(" ").forEach(function(e){t["on"+e]=c["on"+e]});t.write(r);c.abort=function(){t.abort();c.readyState=c.DONE};c.readyState=c.WRITING}),R)}),R)};e.getFile(a,{create:false},g(function(e){e.remove();t()}),g(function(e){if(e.code===e.NOT_FOUND_ERR){t()}else{R()}}))}),R)}),R)},p=h.prototype,m=function(e,t){return new h(e,t)};p.abort=function(){var e=this;e.readyState=e.DONE;w(e,"abort")};p.readyState=p.INIT=0;p.WRITING=1;p.DONE=2;p.error=p.onwritestart=p.onprogress=p.onwrite=p.onabort=p.onerror=p.onwriteend=null;e.addEventListener("unload",v,false);return m}(this.self||this.window||this.content);if(typeof module!=="undefined")module.exports=saveAs}
//# sourceMappingURL=filesaver.map.js